<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Coolface</title>
    <meta name="keywords" content="share"/>
    <meta name="description" content="分享，猿圈"/>
    <meta name="format-detection" content="telephone=no"/>
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
	<script type="text/javascript">
        function ajax(){
            var ajaxData = {
                type:arguments[0].type || "GET",
                url:arguments[0].url || "",
                async:arguments[0].async || "true",
                data:arguments[0].data || null,
                dataType:arguments[0].dataType || "text",
                contentType:arguments[0].contentType || "application/x-www-form-urlencoded",
                beforeSend:arguments[0].beforeSend || function(){},
                success:arguments[0].success || function(){},
                error:arguments[0].error || function(){}
            }
            ajaxData.beforeSend()
            var xhr = createxmlHttpRequest();
            xhr.responseType=ajaxData.dataType;
            xhr.open(ajaxData.type,ajaxData.url,ajaxData.async);
            xhr.setRequestHeader("Content-Type",ajaxData.contentType);
            xhr.send(convertData(ajaxData.data));
            xhr.onreadystatechange = function() {
                if (xhr.readyState == 4) {
                    if(xhr.status == 200){
                        ajaxData.success(xhr.response)
                    }else{
                        ajaxData.error()
                    }
                }
            }
        }

        function createxmlHttpRequest() {
            if (window.ActiveXObject) {
                return new ActiveXObject("Microsoft.XMLHTTP");
            } else if (window.XMLHttpRequest) {
                return new XMLHttpRequest();
            }
        }

        function convertData(data){
            if( typeof data === 'object' ){
                var convertResult = "" ;
                for(var c in data){
                    convertResult+= c + "=" + data[c] + "&";
                }
                convertResult=convertResult.substring(0,convertResult.length-1)
                return convertResult;
            }else{
                return data;
            }
        };
        var forumMsgId = location.href.split('?')[1].split('=')[1];
        console.log(forumMsgId);
        ajax({
            type:"GET",
            url:"../common/getvideoScreenImgs?videoId="+ forumMsgId,
            beforeSend:function(){
                //some js code
            },
            success:function(resp){
                var data = JSON.parse(resp);
                console.log(data);
//                if (data.success && data.data.msgType === 'threeDimensionalVideo') {
                    window.location.href = window.location.origin + '/coolface/share/3Dshare.html?id='+forumMsgId+'&length='+data.data.size+'&musicUrl='+data.data.musicUrl;
//				}
            },
            error:function(){
                console.log("error")
            }
        })
	</script>
	<script type="text/javascript">
        (function flexible (window, document) {
            var docEl = document.documentElement
            var dpr = window.devicePixelRatio || 1

            // adjust body font size
            function setBodyFontSize () {
                if (document.body) {
                    document.body.style.fontSize = (12 * dpr) + 'px'
                }
                else {
                    document.addEventListener('DOMContentLoaded', setBodyFontSize)
                }
            }
            setBodyFontSize();

            // set 1rem = viewWidth / 10
            function setRemUnit () {
                var rem = docEl.clientWidth / 10
                docEl.style.fontSize = rem + 'px'
            }

            setRemUnit()

            // reset rem unit on page resize
            window.addEventListener('resize', setRemUnit)
            window.addEventListener('pageshow', function (e) {
                if (e.persisted) {
                    setRemUnit()
                }
            })

            // detect 0.5px supports
            if (dpr >= 2) {
                var fakeBody = document.createElement('body')
                var testElement = document.createElement('div')
                testElement.style.border = '.5px solid transparent'
                fakeBody.appendChild(testElement)
                docEl.appendChild(fakeBody)
                if (testElement.offsetHeight === 1) {
                    docEl.classList.add('hairlines')
                }
                docEl.removeChild(fakeBody)
            }
        }(window, document))
	</script>
    <!--<script src="http://g.tbcdn.cn/mtb/lib-flexible/0.3.2/??flexible_css.js,flexible.js"></script>-->
    <link rel="stylesheet" href="css/iconfont/iconfont.css">
	<link rel="stylesheet" href="css/weui.min.css">
	<link rel="stylesheet" href="css/jquery-weui.min.css">
    <link rel="stylesheet" type="text/css" href="css/tieziStyle.css">
		<script src="css/iconfont/iconfont.js"></script>
		<style type="text/css">
			.icon1 {
				width: 1em; height: 1em;
				vertical-align: -0.15em;
				fill: currentColor;
				/*fill: #3b5999;*/
				overflow: hidden;
			}
			.weui-photo-browser-modal .swiper-container .swiper-pagination{
				color: white;
				font-size: 30px;
			}
			</style>
</head>
<body style="display: none;">
<div class="main">
	<div class="header">
		<div class="fl logo">

		</div>
		<div class="fr download">
			<p class="downloadApp">下载APP ></p>
		</div>
	</div>
	<div class="message">
		<div class="userInfo">
			<div class="weui-flex user">
				<div class="userImg">
					<!--<img src="image/headerImg01.png" alt="">-->
				</div>
				<div class="weui-flex__item">
					<!--<p class="userName">用户昵称</p>-->
					<p class="desc">
						<span class="userName"></span>
						<span class="time"></span>
						<!--<span class="address">  湖南省 长沙市</span>-->
					</p>
				</div>
				<div class="attention">
					<!--<i class="icon iconfont1 icon-xiala"></i>-->
					<p class="downloadApp">+ 关注</p>
				</div>
			</div>
		</div>
		<div class="messageContent">
			<div class="text">
				<p></p>
			</div>
			<!--媒体资源-->
			<div class="resource">
				<div class="song">
					<audio src="" controls style="display: none">
						<source src="">
					</audio>
				</div>
				<!--<div class="first"></div>-->
				<div class="other"></div>
			</div>

			<p class="showAll downloadApp" style="display: none;">显示全部<span class="resourceNum">x</span>张图片 ></p>
		</div>
		<div class="comment" style="display: none;">
			<div class="commentHeader">
				<!--<i class="icon iconfont1 icon-tubiao15"></i>&nbsp;&nbsp;<span class="commentNum"></span>-->
				<span>评论</span>
			</div>
			<div class="empty"></div>
		</div>
	</div>
	<div class="footer">
		<p class="downloadApp">下载Coolface,看更多有趣内容 ></p>
	</div>
</div>


	<div class="modal" style="display: none;">
		<div class="close">
			<i class="icon iconfont icon-guanbi"></i>
		</div>
		<div class="content">

		</div>
	</div>

	<script id="commentTemp" type="text/html">
        <div class="commentBody">
            <div class="weui-flex commentEditor">
				<div class="headerImg"><img src="headerImage" alt=""></div>
				<div class="weui-flex__item">
					<p><span>用户昵称01</span></p>
					<p class="time">10分钟前</p>
				</div>
				<!--<div class="likeInfo">-->
					<!--<span><i class="icon iconfont1 icon-zan"></i></span><span>likeNum</span><span><i class="icon iconfont1 icon-tubiao15"></i></span>-->
				<!--</div>-->
			</div>
				<div class="commentContent">
					<p>content1</p>
					<div class="commentImg">
						<img src="defaultImg" alt="">
					</div>
					<div class="reply" style="height: 115px;">回复</div>
				</div>
            </div>
	</script>
	<script src="js/lib/jquery-2.1.4.js"></script>
	<script src="js/lib/fastclick.js"></script>
	<script>
        $(function() {
            FastClick.attach(document.body);
        });
	</script>
	<script src="js/lib/jquery-weui.js"></script>
	<!--<script src="js/tieziShare.js"></script>-->
	<script src="js/share.js"></script>
</body>
</html>